/*
 * Copyright (c) 2006, 2023, webrx.cn All rights reserved.
 *
 */
package cn.webrx;

/**
 * <p>Project: jse2302 - Out2
 * <p>Powered by webrx On 2023-06-12 09:53:35
 * <p>Created by IntelliJ IDEA
 *
 * @author  webrx [webrx@126.com]
 * @version 1.0
 * @since 17
 */
public class Out2 {
    public static void main(String[] args) {
        System.out.println("hello world");
        System.out.println("\033[31mhello world\033[0m");
        System.out.println("\033[32mhello world\033[0m");
        System.out.println("\033[41mhello world\033[0m");
        System.out.println("\033[31;42mhello world\033[0m");
        System.out.println("\033[42;31mhello world\033[0m");

        //40-47 背景色
        //30-37 前景色  32 42  31 41
        System.out.println("--------------------------");
        for (int i = 30; i < 50; i++) {
            System.out.printf("\033[%dmhello [%<d] world\033[0m%n", i);

        }

        //输入成功 绿色文字 失败红色
        System.out.println();
        System.out.println();
        System.out.println();

        System.out.println("\033[32m成功\033[0m\t\033[31m失败\033[0m");

        System.out.printf("\033[32m%S\033[0m%n", "green text string");
    }
}
